<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<%@ include file="/module/orderField.jsp"%>

<style>

table label.error {
    margin-left: 5px;
    width: auto;
    display: inline;
    color: red;
}


</style>
</head>
<body>
    <form action="#" name="Form" id="Form" method="post">
      <table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%" >
          <input type="hidden" name="stid" id="stid"  value="${data.stid}"/>
		  <input type="hidden" id="reId" name="reId" value="${reId}"/>
	     	<tr>
				<td class="table-header" colspan="4">社团信息</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 15%">社团姓名:</td>
				<td class="table-contentTD" style="width: 35%">${data.stmc}</td>
				
		        <td class="table-titleTD" style="width: 15%">成立时间:</td>
				<td class="table-contentTD">${data.clsj}</td>
			</tr>
	     <tr>
			    <td class="table-titleTD" style="width: 15%">状态：</td>
				<td class="table-contentTD">
				<c:if test="${data.states==0}">未提交</c:if>
				<c:if test="${data.states==1}">审核退回</c:if>
				<c:if test="${data.states==2}">审核中</c:if>
				<c:if test="${data.states==3}">审核通过</c:if>
				<c:if test="${data.states==8}">退回并结束</c:if>
				<c:if test="${data.states==9}">撤回</c:if>
				</td>
				
                <td class="table-titleTD" style="width: 15%">发起人:</td>
				<td class="table-contentTD">${data.fqrxm}</td>
			</tr>
		  <tr>
			    <td class="table-titleTD" style="width: 15%">社长:</td>
				<td class="table-contentTD">${data.szxm}</td>
				
			    <td class="table-titleTD" style="width: 15%">指导老师:</td>
				<td class="table-contentTD">${data.zdlsxm}</td>
			</tr>
			
			<tr>
			    <td class="table-titleTD" style="width: 15%">申请人:</td>
			    <td class="table-contentTD">${data.creatorname}</td>
			    <td class="table-titleTD" style="width: 15%">申请日期:</td>
			    <td class="table-contentTD"><fmt:formatDate value="${data.createtime}" pattern="yyyy-MM-dd"/></td>
			</tr>
		   
			<tr>
				<td class="table-titleTD" style="width: 15%">现有人员与岗位配置:</td>
				<td class="table-contentTD" colspan="3">${data.rygw}</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 15%">服务宗旨:</td>
				<td class="table-contentTD" colspan="3">${data.fwzz}</td>
			</tr>
            <tr>
				<td class="table-titleTD" style="width: 15%">学年计划:</td>
				<td class="table-contentTD" colspan="3">${data.xnjh}</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 15%">规章制度:</td>
				<td class="table-contentTD" colspan="3" >${data.gzzd}</td>
			</tr>			
		</table>
	   
	   <br />
	   
	   <c:if test="${data.states!=0}">
		<table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%">
	    	 <c:if test="${checkFlag==1}">
			<tr>
				<td class="table-titleTD">审批意见：</td>
				<td class="table-contentTD" colspan="5" style="border: 0;"><input type="text" id="spyj" name="spyj" value="" class="inputText" style="width: 50%"/>&nbsp;&nbsp;	审批结果：
				<input type="radio" id="states" name="states" value="3" checked="checked"/>审核通过&nbsp;&nbsp;
				<input type="radio" id="states" name="states" value="1"/>拒绝&nbsp;&nbsp;
				<input type="button" id="btnSave"   class="inputButton" style="text-align: center;" value="完成审批" />&nbsp;&nbsp;
			    <input type="button" id="returnBut" autocomplete="off"  class="inputButton"value="返回" style="text-align: center;" />
				</td>
			</tr>
			</c:if>
			<tr>
				<td class="table-titleTD" style="text-align: center;">序号</td>
				<td class="table-titleTD" style="text-align: center;">审批人</td>
				<td class="table-titleTD"  style="text-align: center;">审批步骤</td>
				<td class="table-titleTD" style="text-align: center;">审批结果</td>
				<td class="table-titleTD" style="text-align: center;">审批时间</td>
				<td class="table-titleTD" style="text-align: center;">审批意见</td>
			</tr>
			<c:forEach items="${chekResultList}" var="res" varStatus="status">
			<tr>
				<td class="table-contentTD" style="text-align: center;">${status.index+1}</td>
				<td class="table-contentTD" style="text-align: center;">${res.userName}</td>
				<td class="table-contentTD"  style="text-align: center;">${res.stepName}</td>
				<td class="table-contentTD" style="text-align: center;">${res.userState}</td>
				<td class="table-contentTD" style="text-align: center;">${res.approvalTime}</td>
				<td class="table-contentTD" style="text-align: center;">${res.comments}</td>
			</tr>
			</c:forEach>
	     </table>
	   </c:if>
	   
	    <br/>
	 		<c:if test="${checkFlag==0}">
					<table cellpadding="0" cellspacing="0" border="0" align="left">
						<tr>
							 <td><input type="button" id="returnBut" autocomplete="off"  class="inputButton"value="返回" style="text-align: center;" /></td>
						</tr>
					 </table>
			</c:if>
	</form>

		<script>
		 
			$(document).ready(function() {
				//保存
				$("#btnSave").click(function() {
								  layer.confirm("您是否确定审核吗?",{icon : 3,title : '提示',skin : 'layer-ext-moon'},function(index) {
										document.Form.action = "${basePath}/twglStudentCorporation/audit";
										document.Form.submit();	 
								   },function(index) {
									    layer.close(index);
									});	
										
				 });
				  $("#returnBut").click(function() {
		 		 	  window.location.href='${basePath}/twglStudentCorporation/index_audit';
		 		  });
			});
		
		</script>

</body>
</html>
